package com.jay.lang.reflect.intf;

import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;

import com.jay.lang.annotation.intf.MyAnnotation1;

public class AnnotatedElementIntf implements AnnotatedElement {
	public static void main(String[] args) throws NoSuchMethodException,
			SecurityException {
		AnnotatedElement ae = AnnotatedElementIntf.class.getMethod(
				"getAnnotation", Class.class);
		Annotation[] as = ae.getAnnotations();
		for (Annotation a : as) {
			System.out.println(a);
		}
		if (ae.isAnnotationPresent(Override.class)) {
			Annotation anno = ae.getAnnotation(Override.class);
			System.out.println(anno.annotationType());
		} else {
			System.out.println("Can't find @Override.");
		}
	}

	@Override
	public boolean isAnnotationPresent(
			Class<? extends Annotation> annotationClass) {
		// TODO Auto-generated method stub
		return false;
	}

	@Deprecated
	@MyAnnotation1(value1 = "", value2 = 0)
	@Override
	public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Annotation[] getAnnotations() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Annotation[] getDeclaredAnnotations() {
		// TODO Auto-generated method stub
		return null;
	}
}
